/*
 * oppzip.h
 *
 *  Created on: Jul 9, 2013
 *      Author: x
 */

#ifndef OPPZIP_H_
#define OPPZIP_H_

#include <string>
namespace zopp{
struct PAIRWISE{
       float ele;
       float vdw;
       float crt;
       float ori;
       char  mark[4];
};


struct CONF_HEAD{
    char   uniqID[15];
    char   on;
    float  occ;          /* occupance */
    float  netcrg;       /* net charge */
    float  Em;           /* Em of the reduced: RED <=> OX + e- */
    float  pKa;          /* pKa of the acid: HA <=> H+ + A- */
    int    e;            /* number of electron(s) gained */
    int    H;            /* number of proton(s) gained */
    float  E_vdw0;       /* VDW potential to its own (including backbone atoms) */
    float  E_vdw1;       /* VDW potential to backbone atoms (excluding its own) */
    float  E_tors;
    float  E_epol;       /* elec to backbone */
    float  E_rxn0;
    float  E_rxn;
    float  E_dsolv;
    float  E_extra;      /* extra energy to make the calc. match training exep. */
    char   history[12];  /* history of making this conformer */
};

struct EMATRIX{
   int n;
   CONF_HEAD *conf;
   PAIRWISE  **pw;
};

int inf(FILE *source, FILE *dest);

int load_energies(EMATRIX *ematrix, const std::string &dir, int verbose);

int free_ematrix(EMATRIX *ematrix);
}

#endif /* OPPZIP_H_ */
